package com.jnpc.spark.project.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by yangqiang on 2018/3/29 0029.
 */
public class FamenUtil {

    public static Map<String, String> types = new HashMap<String, String>();
    public static Map<String, String> types2= new HashMap<String, String>();
    static {
        types.put("1", "内漏");
        types.put("2", "锈蚀");
        types.put("3", "油漆脱落");
        types.put("4", "卡涩");
        types.put("5", "脱落");
        types.put("6", "漏水");
        types.put("7", "渗水");
        types.put("8", "故障");
        types.put("9", "报警");
        types.put("10", "超时");
        types.put("11", "无法开启");
        types.put("12", "结晶");
        types.put("13", "腐蚀");
        types.put("14", "损坏");
        types.put("15", "外漏");
        types.put("16", "无法操作");
        types.put("17", "断裂");
        types.put("18", "破损");
        types.put("19", "松动");
        types.put("20", "出现错误");
        types.put("21", "硼结晶");
        types.put("22", "砂眼");
        types.put("23", "异物");
        types.put("24", "生锈");
        types.put("25", "切换");
        types.put("26", "漏气");
        types.put("27", "无法控制");
        types.put("28", "松脱");
        types.put("29", "解体");
        types.put("30", "振动");
        types.put("31", "限位");
        types.put("32", "滴水");

        types2.put("内漏","1");
        types2.put("锈蚀","2");
        types2.put("油漆脱落","3");
        types2.put("卡涩","4");
        types2.put("脱落","5");
        types2.put("漏水","6");
        types2.put("渗水","7");
        types2.put("故障","8");
        types2.put("报警","9");
        types2.put("超时","10");
        types2.put("无法开启","11");
        types2.put("结晶","12");
        types2.put("腐蚀","13");
        types2.put("损坏","14");
        types2.put("外漏","15");
        types2.put("无法操作","16");
        types2.put("断裂","17");
        types2.put("破损","18");
        types2.put("松动","19");
        types2.put("出现错误","20");
        types2.put("硼结晶","21");
        types2.put("砂眼","22");
        types2.put("异物","23");
        types2.put("生锈","24");
        types2.put("切换","25");
        types2.put("漏气","26");
        types2.put("无法控制","27");
        types2.put("松脱","28");
        types2.put("解体","29");
        types2.put("振动","30");
        types2.put("限位","31");
        types2.put("滴水","32");


    }


    public static String getType(String fccontent){
      String[] a=  fccontent.split("\\|");
      for(String b:a){
          if(types2.get(b)!=null){
              return types2.get(b);
          }
      }
      return "";
    }




}
